'''
Brief:
  解析命令行
'''

import argparse
parser = argparse.ArgumentParser(description="CNN Classifier")
parser.add_argument('--num-classes',type=int,default=8,help="分类数目")
#记录数据集的文件，建议使用绝对路径
parser.add_argument('--train-list', type=str,default="train.txt")
parser.add_argument('--valid-list', type=str,default="valid.txt")

# ========================= Learning Configs ==========================
parser.add_argument('--epochs', default=100, type=int, metavar='N',
                    help='number of total epochs to run')
# 迭代次数
parser.add_argument('-b', '--batch-size', default=256, type=int,
                    metavar='N', help='mini-batch size (default: 256)')
#batch size
parser.add_argument('--lr', '--learning-rate', default=0.1, type=float,help='initial learning rate')
#初始学习率

# ========================= Monitor Configs ==========================
parser.add_argument('--print-freq', '-p', default=10, type=int,
                    metavar='N', help='print frequency (default: 10)')
#这个没啥用
parser.add_argument('--eval-freq', '-ef', default=2, type=int,
                    metavar='N', help='evaluation frequency (default: 5)')


# ========================= Runtime Configs ==========================
#这里只写了单机单卡gpu/cpu训练，一般也用不到多gpu
parser.add_argument('--logdir', default='./runs', type=str, metavar='PATH',
                    help='path to print tensorboard log & save checkpoint')
parser.add_argument('--pretrained-model',default='',type=str,metavar='PATH',
                    help='pretrained-weight path')
parser.add_argument('--start-epoch', default=0, type=int, metavar='N',
                    help='manual epoch number (useful on restarts)')
